﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Masterpages/FlintMenu.Master" CodeBehind="ForeCast.aspx.vb" Inherits="Forecast.Webforms.ForeCast" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
     
<%@ Register src="ctrlAgregarForecast.ascx" tagname="ctrlAgregarForecast" tagprefix="uc2" %>

      
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
       <script type="text/javascript" src="../Scripts/jquery-1.7.1.min.js"></script>
       <script type="text/javascript" src="../Scripts/jquery-ui-1.8.17.custom.min.js"></script>
       <script type="text/javascript" src="../Scripts/DetGastoScript.js"></script>
       <link href="../Style/jquery-ui-1.8.17.custom.css" rel="Stylesheet" type="text/css" />

        <style type="text/css">
            .DynamicDialogStyle
            {
                background-color: #FFFFFF;
                font-size: small;
            }
       
            .auto-style2
            {
            }
       
            .auto-style3
            {
                height: 20px;
            }
       
            .auto-style4
            {
                width: 74px;
            }
            .auto-style5
            {
                width: 83px;
            }
            .auto-style6
            {
                width: 216px;
            }
       
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
           <%--    <asp:Button ID="LoadLocalDialog" runat="server" Text="Agregar Gasto" BorderColor="#0099FF" BorderStyle="Solid" BorderWidth="1px" Height="25px" Width="143px" OnClick="btnAgregarGasto_Click" />--%>
      
        <asp:ToolkitScriptManager ID="ScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
             
             <br />
             <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                 <ContentTemplate>
                 <%--    <asp:Button ID="LoadLocalDialog" runat="server" Text="Agregar Gasto" BorderColor="#0099FF" BorderStyle="Solid" BorderWidth="1px" Height="25px" Width="143px" OnClick="btnAgregarGasto_Click" />--%>
                      <%--<asp:Button ID="LoadLocalDialog" runat="server" Text="Agregar Gasto" CssClass="boton" OnClick="btnAgregarGasto_Click" />--%>
                  <div class="w970 vs12_light_form" runat="server" ID="pnlRendicion">
                     
                        <table style="width:100%;">
                         <tr>
                             <td>
                               
                                 <asp:CheckBox ID="ChFiltro" runat="server" Text="Búsqueda por Parametros" AutoPostBack="True" />
                                 
                             </td>
                             <td>
                                 &nbsp;<asp:Button ID="btnIngresarForescast" runat="server" CssClass="boton" Text="Ingresar Forecast" ValidationGroup="NoValidar" />
                             </td>
                         </tr>
                         <tr>
                             <td style="text-align: left; vertical-align: top;">
                                 <table style="border-style: solid; border-width: thin; width: 701px; background-color: #FFFFFF;" runat="server" id="TBFiltro">
                                     <tr>
                                         <td class="auto-style4" style="background-color: #DADADA">
                                             <asp:Label ID="Label16" runat="server" Text="Cod. Cliente"></asp:Label>
                                         </td>
                                         <td class="auto-style6">
                                             <asp:TextBox ID="TxtCodClienteB" runat="server" Width="100px"></asp:TextBox>
                                         </td>
                                         <td class="auto-style5" style="background-color: #DADADA">
                                             <asp:Label ID="Label21" runat="server" Text="Nom. Cliente"></asp:Label>
                                         </td>
                                         <td>
                                             <asp:DropDownList ID="DrClientesB" runat="server" Width="220px">
                                             </asp:DropDownList>
                                         </td>
                                         <td rowspan="3">
                                             <asp:Button ID="btnBuscar" runat="server" CssClass="boton" Height="45px" Text="Buscar" Width="70px" />
                                             <br />
                                             <asp:Button ID="btnLimpiarB" runat="server" CssClass="boton" Height="27px" Text="Limpiar" Width="70px" />
                                         </td>
                                     </tr>
                                     <tr>
                                         <td class="auto-style4" style="background-color: #DADADA">
                                             <asp:Label ID="Label17" runat="server" Text="Segmento"></asp:Label>
                                         </td>
                                         <td class="auto-style6">
                                             <asp:DropDownList ID="DrSegmentoPLB" runat="server" Width="200px">
                                             </asp:DropDownList>
                                         </td>
                                         <td class="auto-style5" style="background-color: #DADADA">
                                             <asp:Label ID="Label19" runat="server" Text="Producto"></asp:Label>
                                         </td>
                                         <td>
                                             <asp:DropDownList ID="DrProductoB" runat="server" Width="220px">
                                             </asp:DropDownList>
                                         </td>
                                     </tr>
                                     <tr>
                                         <td class="auto-style4" style="background-color: #DADADA">
                                             <asp:Label ID="Label18" runat="server" Text="ProductLine"></asp:Label>
                                         </td>
                                         <td class="auto-style6">
                                             <asp:DropDownList ID="DrProductLineB" runat="server" Width="200px">
                                             </asp:DropDownList>
                                         </td>
                                         <td class="auto-style5" style="background-color: #DADADA">
                                             <asp:Label ID="Label20" runat="server" Text="UOM"></asp:Label>
                                         </td>
                                         <td>
                                             <asp:DropDownList ID="DrUOMB" runat="server" Width="100px">
                                             </asp:DropDownList>
                                         </td>
                                     </tr>
                                 </table>
                                
                                 <asp:Panel ID="Panel1" runat="server" Height="450px" ScrollBars="Horizontal" Width="718px">
                                     
                                     <asp:GridView ID="GrProductDeForeCast" runat="server" AutoGenerateColumns="False" Height="76px" OnRowCommand="GrProductDeForeCast_RowCommand"  CssClass="vs12_light_grid_trdl_alt pd5p" OnSelectedIndexChanged="GrProductDeForeCast_SelectedIndexChanged" CellPadding="4" ForeColor="#333333" GridLines="None" Width="700px">
                                         <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                         <Columns>
                                             <asp:CommandField SelectText="&lt;img alt=&quot;&quot; src=&quot;flint/bgEditar.png&quot; id=&quot;CargaWin&quot; /&gt;" ShowSelectButton="True" Visible="False" />
                                             <asp:BoundField DataField="ID" HeaderText="ID" Visible="False" />
                                             <asp:BoundField DataField="IdForecast" HeaderText="IdForecast" Visible="False" />
                                             <asp:BoundField DataField="CodCliente" HeaderText="Cliente">
                                             <HeaderStyle Width="80px" />
                                             </asp:BoundField>
                                             <asp:BoundField DataField="DesSegment" HeaderText="Segmento">
                                             <HeaderStyle Width="80px" />
                                             </asp:BoundField>
                                             <asp:BoundField DataField="DesProductLine" HeaderText="ProductLine">
                                             <HeaderStyle Width="120px" />
                                             </asp:BoundField>
                                             <asp:BoundField DataField="DesProduct" HeaderText="Producto">
                                             <HeaderStyle Width="200px" />
                                             </asp:BoundField>
                                             <asp:BoundField DataField="CodUOM" HeaderText="UOM">
                                             <HeaderStyle Width="32px" />
                                             </asp:BoundField>
                                             <asp:TemplateField Visible="False">
                                                 <ItemTemplate>
                                                     <asp:Button ShowSelectButton="True" ID="btnEditar" runat="server" CommandArgument="<%# Container.DataItemIndex %>" CommandName="Editar" CssClass="btnVer" Text="" ToolTip="Editar" />
                                                     <!--   <asp:Button ID="btnEliminar" runat="server" Text="" CssClass="btnEliminar" CommandName="Eliminar" CommandArgument='<%# Container.DataItemIndex %>' ToolTip="Eliminar"/>-->
                                                 </ItemTemplate>
                                                 <HeaderStyle Width="23px" />
                                             </asp:TemplateField>
                                             <asp:CommandField ShowSelectButton="True" SelectText="&lt;img alt=&quot;&quot; src=&quot;../css/flint/bgVer.png&quot; /&gt;">
                                             <HeaderStyle Width="18px" />
                                             </asp:CommandField>
                                         </Columns>
                                         <SelectedRowStyle BackColor="#d6e0f5" Font-Bold="True" ForeColor="#333333" BorderColor="#003399" BorderWidth="2px" />
                                     </asp:GridView>
                                    
                                 </asp:Panel>
                             </td>
                             <td  style="text-align: left; vertical-align: top;">
                                 <table runat="server" id="TBDetalleForecast" style="width: 400px; text-align: left">
                                     <tr>
                                         <td  style="text-align: left">

                                             <div id="DetalleForecast" class="vs12_light_form vs12_light_form_modal" style="width:100%;">
                                      <table style="width:300px;">
                                     
                                     <tr>
                                         <td style="text-align: left; vertical-align: top; background-color: #CCCCCC;" class="auto-style2">
                                             <asp:Label ID="Label15" runat="server" Text="Cod. Cliente"></asp:Label>
                                         </td>
                                        <td style="text-align: left; vertical-align: top">
                                             <asp:TextBox ID="txtCodCliente" runat="server" Enabled="False"></asp:TextBox>
                                         </td>
                                     </tr>
                                          <tr>
                                              <td class="auto-style2" style="text-align: left; vertical-align: top; background-color: #CCCCCC;">
                                                  <asp:Label ID="Label6" runat="server" Text="Cliente" Width="100px"></asp:Label>
                                              </td>
                                              <td style="text-align: left; vertical-align: top">
                                                  <asp:DropDownList ID="DrClientes" runat="server" Width="420px">
                                                  </asp:DropDownList>
                                              </td>
                                          </tr>
                                     <tr>
                                         <td style="text-align: left; vertical-align: top; background-color: #CCCCCC;" class="auto-style2">
                                             <asp:Label ID="Label7" runat="server" Text="Segmento/ProductLine"></asp:Label>
                                         </td>
                                         <td style="text-align: left; vertical-align: top">
                                             <asp:DropDownList ID="DrSegmentoPL" runat="server" AutoPostBack="True" Width="420px">
                                             </asp:DropDownList>
                                         </td>
                                     </tr>
                                     <tr>
                                         <td style="text-align: left; vertical-align: top; background-color: #CCCCCC;" class="auto-style2">
                                             <asp:Label ID="Label8" runat="server" Text="Producto"></asp:Label>
                                         </td>
                                         <td style="text-align: left; vertical-align: top">
                                             <asp:DropDownList ID="DrProducto" runat="server" AutoPostBack="True" Width="420px">
                                             </asp:DropDownList>
                                         </td>
                                     </tr>
                                     <tr>
                                         <td style="text-align: left; vertical-align: top; background-color: #CCCCCC;" class="auto-style2">
                                             <asp:Label ID="Label9" runat="server" Text="UOM"></asp:Label>
                                         </td>
                                         <td style="text-align: left; vertical-align: top">
                                             <asp:TextBox ID="TxtUOM" runat="server" Enabled="False"></asp:TextBox>
                                         </td>
                                     </tr>
                                     <tr>
                                         <td style="text-align: right; vertical-align: top" class="auto-style2" colspan="2">
                                             <center>
<table style="border-style: 0; border-color: 0; border-width: 0px; width:100%;">
    <tr>
        <td style="background-color: #D7D7D7"><center><asp:Label ID="Label22" runat="server" Text="Actual"></asp:Label></center>
        </td>
        <td style="background-color: #D7D7D7"><center><asp:Label ID="Label23" runat="server" Text="ForeCast"></asp:Label></center>
        </td>
    </tr>
    <tr>
        
        <td>
            <asp:GridView ID="GrPeriodInactivo" runat="server" AutoGenerateColumns="False" CssClass="vs12_light_grid_trdl_alt pd5p">
                <Columns>
                    <asp:BoundField DataField="ID" HeaderText="ID" Visible="False" />
                    <asp:BoundField DataField="IdForecast" HeaderText="IdForecast" Visible="False" />
                    <asp:BoundField DataField="Period" HeaderText="Period">
                    <HeaderStyle Width="60px" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Volume" HeaderText="Volume">
                    <HeaderStyle Width="60px" />
                    <ItemStyle HorizontalAlign="Right" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="Venta" DataField="ValuesSP">
                    <HeaderStyle Width="70px" />
                    <ItemStyle HorizontalAlign="Right" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="Costo" DataField="ValuePC">
                    <HeaderStyle Width="70px" />
                    <ItemStyle HorizontalAlign="Right" />
                    </asp:BoundField>
                   
                    <asp:BoundField DataField="CurrencyPC" HeaderText=" " Visible="False">
                    <HeaderStyle Width="30px" />
                    </asp:BoundField>
                </Columns>
            </asp:GridView>
        </td>
        <td>
            <asp:GridView ID="GrPeriodActivo" runat="server" AutoGenerateColumns="False" CssClass="vs12_light_grid_trdl_alt pd5p" Width="270px">
                <Columns>
                    <asp:BoundField DataField="ID" HeaderText="ID" Visible="False" />
                    <asp:BoundField DataField="IdForecast" HeaderText="IdForecast" Visible="False" />
                    <asp:BoundField DataField="Period" HeaderText="Period">
                    <HeaderStyle Width="60px" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Volume" HeaderText="Volume">
                    <HeaderStyle Width="60px" />
                    <ItemStyle HorizontalAlign="Right" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="Venta" DataField="ValuesSP">
                    <HeaderStyle Width="70px" />
                    <ItemStyle HorizontalAlign="Right" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="Costo" DataField="ValuePC">
                    <HeaderStyle Width="70px" />
                    <ItemStyle HorizontalAlign="Right" />
                    </asp:BoundField>
                    
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Button ID="btnEditar" runat="server" CommandArgument="<%# Container.DataItemIndex %>" CommandName="Editar" CssClass="btnEditar" Text="" ToolTip="Editar" />
                            <!--   <asp:Button ID="btnEliminar" runat="server" Text="" CssClass="btnEliminar" CommandName="Eliminar" CommandArgument='<%# Container.DataItemIndex %>' ToolTip="Eliminar"/>-->
                        </ItemTemplate>
                        <HeaderStyle Width="20px" />
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
        
    </tr>
    </table>
                                             </center>
                                         </td>
                                     </tr>
                                 </table>
                                </div>

                                         </td>
                                         
                                     </tr>                                     
                                 </table>
                                 <table id="TBFormIngModForescast" runat="server" style="width: 95%;">
                                     <tr>
                                         <td>
<div id='FormIngModForescast' class="vs12_light_form vs12_light_form_modal" style="width:100%;">
                                      <table style="width:100%;">
                                          <tr>
                                         <td style="text-align: center; vertical-align: top; background-color: #C0C0C0;" class="auto-style3" colspan="2">
                                             <asp:Label ID="LblTitulo" runat="server" Font-Bold="True" Font-Size="Small" Text="Ingreso de Forecast"></asp:Label>
                                         </td>
                                         </tr>
                                          <tr>
                                              <td style="text-align: left; vertical-align: top; background-color: #CCCCCC;">
                                                  <asp:Label ID="Label14" runat="server" Text="Periodo" Width="100px"></asp:Label>
                                              </td>
                                              <td style="text-align: left; vertical-align: top">
                                                  <asp:DropDownList ID="DrPeriodo" runat="server" Width="270px">
                                                  </asp:DropDownList>
                                              </td>
                                          </tr>
                                          <tr>
                                         <td style="text-align: left; vertical-align: top; background-color: #CCCCCC;">
                                             <asp:Label ID="Label3" runat="server" Text="Cliente" Width="100px"></asp:Label>
                                         </td>
                                              <td style="text-align: left; vertical-align: top">
                                             <asp:DropDownList ID="DrClienteIng" runat="server" Width="420px" AutoPostBack="True">
                                             </asp:DropDownList>
                                         </td>
                                         </tr>
                                             <tr>
                                         <td style="text-align: left; vertical-align: top; background-color: #CCCCCC;">
                                             <asp:Label ID="Label10" runat="server" Text="Segmento/ProductLine"></asp:Label>
                                         </td>
                                         <td style="text-align: left; vertical-align: top">
                                             <asp:DropDownList ID="DrSegmentoPLIng" runat="server" AutoPostBack="True" Width="420px">
                                             </asp:DropDownList>
                                         </td>
                                     </tr>
                                     <tr>
                                         <td style="text-align: left; vertical-align: top; background-color: #CCCCCC;">
                                             <asp:Label ID="Label11" runat="server" Text="Producto"></asp:Label>
                                         </td>
                                         <td style="text-align: left; vertical-align: top">
                                             <asp:DropDownList ID="DrProductoIng" runat="server" AutoPostBack="True" Width="420px">
                                             </asp:DropDownList>
                                         </td>
                                     </tr>
                                     <tr>
                                         <td style="text-align: left; vertical-align: top; background-color: #CCCCCC;">
                                             <asp:Label ID="Label12" runat="server" Text="UOM"></asp:Label>
                                         </td>
                                         <td style="text-align: left; vertical-align: top">
                                             <asp:TextBox ID="TxtUOMIng" runat="server" Enabled="False"></asp:TextBox>
                                         </td>
                                     </tr>
<tr>
                                         <td style="text-align: left; vertical-align: top; background-color: #CCCCCC;">
                                             <asp:Label ID="Label13" runat="server" Text="Volumen"></asp:Label>
                                         </td>
                                         <td style="text-align: left; vertical-align: top">
                                             <asp:TextBox ID="TxtVolumen" runat="server" MaxLength="9"></asp:TextBox>
                                             <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="TxtVolumen" ErrorMessage="Valor Inválido" ForeColor="#CC3300" MaximumValue="999999999" MinimumValue="1" Type="Integer" ValidationGroup="IngresoModGuardarForeCasr"></asp:RangeValidator>
                                         </td>
                                     </tr>
                                          <tr>
                                              <td  style="text-align: left; vertical-align: top; ">
                                                  <asp:Button ID="BtnGuardarForeCast" runat="server" CssClass="boton" Text="Guardar" Width="80px" ValidationGroup="IngresoModGuardarForeCasr" />
                                                 
                                                  
                                              </td>
                                              <td>
<asp:Button ID="BtnCancelarForeCast" runat="server" CssClass="boton" Text="Cancelar" Width="80px" ValidationGroup="NoValidar" />
                                              </td>
                                          </tr>
                                      </table>
                                    <div class="vs12_light_contenedorMsg" runat="server" id="ErroresLogin" visible="false">
                                        <table style="width: 100%" runat="server" id="LblError" >
                                            <tr>
                                                <td style="width:24px; vertical-align: top">
                                                    <asp:Image ID="ImgErrores" runat="server" ImageUrl="~/Images/icons/Mensaje/icoError.png"/> 
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblErrores" runat="server" Text=""/>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>   
                                      </div>
                                         </td>
                                     </tr>                                    
                                 </table>
                               <table style="width:570px">
                                   <tr>
                                       <td> &nbsp; </td>
                                   </tr>
                               </table>
                                  
                             </td>
                         </tr>
                     </table>
                      </div>
                     <%--<uc1:AgregarForecast ID="AgregarForecast1" runat="server" />--%>
                     <br />
                                       <br />
                     <br />
                     
                 </ContentTemplate>
</asp:UpdatePanel>
 
&nbsp;<br />
    <br />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>
